#include "Directory/Directory.h"
#include "SystemLog.h"

SystemTool::IO::Log* pSystemLogger = SystemTool::IO::Log::GetInstance();

struct LoggerInitialize
{
	LoggerInitialize()
	{
		std::string strCurExePath = SystemTool::IO::Directory::GetExcutableDirectory();

		strCurExePath = SystemTool::IO::Directory::AddEnding(strCurExePath) + "SystemLog";

		pSystemLogger->ConfigureEnvironment(strCurExePath);
	}

	~LoggerInitialize()
	{
		pSystemLogger->Flush();

		SystemTool::IO::Log::DestoryInstance();
	}
};

static LoggerInitialize g_LoggerInitialize;